using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using WindowsGame.Enums;
using WindowsGame.Static;
using WindowsGame.Library;

namespace WindowsGame.GameObjects
{
	public class GameBoard
	{
		private GameSize size;
		private Texture2D horizontal;
		private Texture2D vertical;
 		private  Int32 width;
		private Int32 height;
		private Int32 step;

		public GameBoard(GameSize size, Int32 width, Int32 height)
		{
			this.size = size;

			this.horizontal = Assets.HorizontalTexture;
			this.vertical = Assets.VerticalTexture;
			this.width = width;
			this.height = height;
			step = (Int32)size * 8;
		}

		public void Draw()
		{
			for (int x = 0; x < width; x += step)
			{
				Engine.SpriteBatch.Draw(vertical, new Vector2(x, 0), Color.White);
			}
			for (int y = 0; y < height; y += step)
			{
				Engine.SpriteBatch.Draw(horizontal, new Vector2(0, y), Color.White);
			}

			Engine.SpriteBatch.Draw(vertical, new Vector2(width - 1, 0), Color.White);
			Engine.SpriteBatch.Draw(horizontal, new Vector2(0, height - 1), Color.White);
		}
	}
}